# coding=utf-8
from common.sqlOperate import *
if __name__ == '__main__':
   #host = '192.168.3.44'
   host = '192.168.0.77'
   #host = 'localhost'
   port = 3306
   #user='test123'
   #password='test1234'
   user = 'root'
   password = 'root1234'
   #b='gwza0306'
   db = 'gwza'
   #db = 'gwza_refactory_local'
   #name = "警告型 — 禁止入内"
   #path = os.path.dirname(__file__)
   #print(path)
   surface = 'map_device_his0329'  #表
   t1 = '2024-04-09 12:32:10'
   t2 = '2024-04-09 12:47:10'
   # df = pd.read_excel('./config/data.xls', sheet_name='Sheet5', header=0)
   # ids = df.values
   # idslist = []
   ids = [['GW1D19']]
   ob = sqlOperate(host, port, user, password, db)
   ob.sqlConnect()
   for v in ids:
       #device = 'GW19F4'
       status_1, status_minus_1, status_0, status_32, probability_of_minus_1 = ob.stopOrmove(surface, v[0],t1,t2)
       print(v[0])
       print(status_1, status_minus_1, status_0, status_32, probability_of_minus_1)

       #idslist.append(v[0])





